package com.lancoo.klgcourseware.manager;

import android.app.Dialog;
import android.os.Bundle;
import android.util.DisplayMetrics;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.DialogFragment;

import com.lancoo.klgcourseware.R;
import com.lancoo.klgcourseware.utils.KlgToolUtils;

import java.lang.ref.WeakReference;

/**
 * Created by pengmi on 2020/12/15 14:48
 * Description:
 */
public class KlgCardNoDataDialogFragment extends DialogFragment{

//    private WeakReference<View> convertView;

    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setStyle(DialogFragment.STYLE_NORMAL, R.style.klg_NoBgColorStyle);
    }


    @Override
    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
//        getDialog().getWindow().getAttributes().windowAnimations = R.style.new_DialogAnimation;
    }

    @Override
    public void onStart() {
        super.onStart();
        Dialog dialog = getDialog();
        if (dialog != null&&dialog.getWindow()!=null) {
            dialog.getWindow().setGravity(Gravity.CENTER);
        }
    }

    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View inflate = inflater.inflate(R.layout.klg_dialog_no_knowledge_meaning,container,false);
//        convertView=new WeakReference<>(inflate);
        return inflate;
    }
    

}
